package BanyuanClub.Study.Day0304;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * 字节缓冲输入流
 */
public class TextBufferedInputStream {
    public static void main(String[] args) {

    try(BufferedInputStream bis = new BufferedInputStream(
            new FileInputStream("src.txt")
    )){
        byte[] by = new byte[4];
        bis.read();
        bis.mark(100);
        bis.read(by);
        System.out.println(bis.read());
        bis.reset();
        System.out.println(bis.read());
        int end;


    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    }
}
